jQuery.noConflict();
(function($) {

$(document).ready(function() {

// POST FORMAT RADIO BUTTONS
var videoFormat = $("#post-format-video");
var galleryFormat = $("#post-format-gallery");


// POST FORMAT METABOXES
var videoMetabox = $("#videof_settings");
var galleryMetabox = $("#galleryf_settings");




// HIDE ALL METABOXES ON LOAD
var allMetaboxes = $("#videof_settings, #galleryf_settings");
allMetaboxes.css({ display: 'none' });


// SHOW X METABOX IF X READIO IS CHECKED ON LOAD


if(videoFormat.is(':checked')){
videoMetabox.css({ display: 'block' });
}

if(galleryFormat.is(':checked')){
galleryMetabox.css({ display: 'block' });
}


//ON RADIO BUTTONS CHANGE
var radioSet = jQuery('#post-formats-select input');

radioSet.change( function() {
	if($(this).val() == 'video') {
		allMetaboxes.css({ display: 'none' });
		videoMetabox.css({ display: 'block' });
	}
	else if($(this).val() == 'gallery') {
		allMetaboxes.css({ display: 'none' });
		galleryMetabox.css({ display: 'block' });
	}
	else {
		allMetaboxes.css({ display: 'none' });
	}
});



});

})(jQuery);